<%@page pageEncoding="utf-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<table width='100%' height='31' border='0' cellspacing='0'
		cellpadding='0'>
	<tr>
		<td width='40'
			background='${pageContext.request.contextPath}/common/images/index_26.jpg'>&nbsp;
			
		</td>
		<!--内容区导航开始-->
		<td align='left' valign='middle'
			background='${pageContext.request.contextPath}/common/images/ctitle_bak_center.jpg'>
			<span class="channel_title">读者管理
				<span style="color:#000;"> >>读者信息修改查询  >></span> </span></td>
		<!--内容区导航结束-->
		<td align='left' valign='middle'
			background='${pageContext.request.contextPath}/common/images/ctitle_bak_center.jpg'>&nbsp;
			
		</td>
		<td width='13' align='right' valign='middle'
			background='${pageContext.request.contextPath}/common/images/ctitle_bak_center.jpg'>
			<img src="${pageContext.request.contextPath}/common/images/ctitle_bak_right.jpg" height="31" width="10">
		</td>
	</tr>
</table>

<table width='100%' border='0' cellspacing='0' cellpadding='0'>
	<tr height="10%">
		<td align="left" height='31' background='${pageContext.request.contextPath}/common/images/ctitle_bak_fcenter.jpg'>
			<form action="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=modify_show" method="post" onsubmit="return (checkquery());">
				<span style="fond-size:12px">查询条件：&nbsp;</span>
				<span style="fond-size:12px">用户姓名:</span><input type="text" id="userName" name="userName" style="WIDTH:80px">
				<span style="fond-size:12px">用户编号:</span><input type="text" id="lib_card" name="lib_card" style="WIDTH:80px">
				<span style="fond-size:12px">用户身份：</span>
				<select id="user_type" name="user_type">
				<option value="-1"></option>
				<c:forEach items="${allUserTypes}" var="usertype">
					<option value="${usertype.id}">${usertype.type_name}</option>
				</c:forEach>
			</select>
				<input type="submit" value="查询">
			</form>	
		</td>		
	</tr>
	
	<tr height="285px">
		<td width="100%" valign="top">				
			<div style="overflow:auto;">	
			
			
			<table cellspacing='0' cellpadding='0' width="100%"  border="1">				
					<tr class="tabhead">
						<th>序    号</th>					
						<th>姓    名</th>
						<th>编    号</th>
						<th>职位/学位</th>
						<th>操    作</th>
					</tr>
					<c:forEach items="${allUsers}" var="user" varStatus="loopStatus">
						<tr>			
							<td align="center">${loopStatus.count+(thisPage-1)*10}</td>			
							<td align="center" ><a href="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=showuser&id=${user.id}">${user.userName}</a></td>
							<td align="center" >${user.lib_card}</td>
							<td align="center" >
								<c:forEach items="${allUserTypes}" var="usertype">
									<c:if test="${usertype.id==user.user_type}">						
										<span>${usertype.type_name}</span>
									</c:if>
								</c:forEach>
							</td>
							<td align="center" width="25%"><a href="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=modifyreader&id=${user.id}">修改</a></td>
						</tr>
					</c:forEach>
				</table>
			</div>
		</td>
	</tr>
	<tr height="20px" align="right">
		<td>
			第${thisPage}页/共${allPage}页&nbsp;&nbsp;
			<a href="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=modify_show&pages=first&lib_card=${lib_card}&userName=${userName}&user_type=${user_type}&tPage=${thisPage}">|第一页</a>|
			<a href="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=modify_show&pages=previous&lib_card=${lib_card}&userName=${userName}&user_type=${user_type}&tPage=${thisPage}">上一页</a>|
			<a href="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=modify_show&pages=next&lib_card=${lib_card}&userName=${userName}&user_type=${user_type}&tPage=${thisPage}">下一页</a>|
			<a href="${pageContext.request.contextPath}/sysManage/readerManage/reader.do?method=modify_show&pages=last&lib_card=${lib_card}&userName=${userName}&user_type=${user_type}&tPage=${thisPage}">最后一页</a>|
		</td>	
	</tr>
</table>

<script type="text/javascript">
	function checkquery(){
		var userName = document.getElementById("userName").value;
		var lib_card = document.getElementById("lib_card").value;
		if(lib_card!=""){
			if(isNaN(lib_card)){
				alert("编号必须为数字");
				return false;
			}
		}
		var temp = userName.split('');
			for(var i =0 ; i<temp.length;i++){
					if(temp[i]=="'"){
						alert("非法输入！请重新输入。");
						return false;
					}
				}
	}
</script>
